<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Feedback extends Model {
	public static $rules = [
		'name' => 'required|max:20',
		'mobile' => 'required|regex:/^[1][0-9]{10}$/',
		'msg' => 'required|max:255',
	];
	public static $message = [
		'name.required' => '姓名不能为空',
		'name.max' => '姓名最多20个字符',
		'mobile.required' => '电话不能为空',
		'mobile.regex' => '电话格式不正确',
		'msg.required' => '留言不能为空',
		'msg.max' => '留言最多255个字符',
	];
	protected function getDateFormat() {
		return time();
	}
}
